import service from '@/utils/crmRequest'

export default () => ({

  // 区域招商匹配列表
  REGIONAL_LIST: function (data) {
    return service({
      url: '/api/agentProduct/list',
      method: 'post',
      data
    })
  },

  // 区域招商匹配详情
  REGIONAL_DETAILS: function (id) {
    return service({
      url: `/api/agentProduct/detail?id=${id}`,
      method: 'GET',
    })
  },


  // 获取配送费下拉列表---配送服务列表
  REGIONAL_PRICE_LIST: (data) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDisDetailPull`,
      method: 'post',
      data
    })
  },

  // 获取配送费下拉列表---终端列表
  REGIONAL_TERMINAL_LIST: (data) => {
    return service({
      url: `/api/distributeContractDetail/terminals`,
      method: 'post',
      data
    })
  },

  //区域招商匹配 ----配送信息列表
  REGIONAL_DISTRIBUTION_LIST: (id) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDisDetail?agentProductId=${id}`,
      method: 'GET',
    })
  },

  //区域招商匹配---配送信息列表详情
  REGIONAL_DISTRIBUTION_DETAILS: (id) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDistributeDetail?id=${id}`,
      method: 'GET',
    })
  },

  //区域招商匹配---配送信息列表删除
  REGIONAL_DISTRIBUTION_DELETE: (id) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDis?id=${id}`,
      method: 'delete',
    })
  },

  //区域招商匹配---配送服务（表格）
  REGIONAL_DISTRIBUTION_SERVICE: (id) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDisServer?agentProductId=${id}`,
      method: 'get',
    })
  },



  //区域招商匹配 ---- 配送终端列表
  REGIONAL_DISTRIBUTION_TERMINAL_LIST: (data) => {
    return service({
      url: `/api/distributeContractDetail/distributeTerminals`,
      method: 'post',
      data
    })
  },

  //区域招商匹配 ---- 配送终端列表
  REGIONAL_DISTRIBUTION_TERMINAL_DETAILS: (id) => {
    return service({
      url: `/api/dev/detail?id=${id}`,
      method: 'get',
    })
  },

  //区域招商匹配 ---- 提交配送终端
  REGIONAL_DISTRIBUTION_SERVIC_SUNMINT: (data) => {
    return service({
      url: `/api/distributeContractDetail/disAssociationTerminals`,
      method: 'post',
      data
    })
  },

  // 获取区域招商下的配送商信息
  REGIONAL_DISTRIBUTION_PULLLIST: (id) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDistributes?agentProductId=${id}`,
      method: 'get',
    })
  },

  // 获取区域招商下的配送费信息
  REGIONAL_DISTRIBUTION_PULLLIST_SERVICE: (id,ids) => {
    return service({
      url: `/api/distributeContractDetail/agentProductDistributeServers?agentProductId=${id}&distributeId=${ids}`,
      method: 'get',
    })
  },

})